<!DOCTYPE html>
<html lang="ru">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Портфолио Студента</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet" />
    <link href="{{ url_for('static', filename='css/bootstrap-utilities.css') }}" rel="stylesheet" />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/css/intlTelInput.css" />
    <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}" />
  </head>
  <body>
    <header>
      <nav class="navbar navbar-expand-lg px-0 fixed-top" style="background-color: #007bff">
        <div class="container-xxl">
          <a class="navbar-brand text-white">Студпортфолио</a>
          <div class="collapse navbar-collapse" id="navbarContent">
            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
              <li class="nav-item">
                <a class="nav-link active text-white" aria-current="page" href="{{ url_for('auth.index') }}">Главная</a>
              </li>
              {% if current_user.is_authenticated %}
              <li class="nav-item">
                <a class="nav-link text-white" href="{{ url_for('vacancy.list_vacancies') }}">Список вакансий</a>
              </li>
              {% endif %}
            </ul>
            <form action="#" method="get" class="d-flex">
              <input class="form-control me-2" type="search" placeholder="Поиск..." aria-label="Поиск" name="query" />
              <button class="btn btn-outline-light" type="submit">Поиск</button>
            </form>
            <div class="ms-auto"></div>
            {% if current_user.is_authenticated %}
            <ul class="navbar-nav">
              <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle d-flex align-items-center text-white" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                  {% if current_user.avatar_url %}
                  <img src="{{ url_for('static', filename=current_user.avatar_url) }}" alt="Аватар" class="rounded-circle me-2" style="width: 25px; height: 25px" />
                  {% else %}
                  <img src="{{ url_for('static', filename='icons/i.jpg') }}" alt="Стандартный аватар" class="rounded-circle me-2" style="width: 25px; height: 25px" />
                  {% endif %}
                  <span>{{ current_user.username }}</span>
                </a>
                <ul class="dropdown-menu">
                  <li><a class="dropdown-item" href="{{ url_for('auth.employer_profile', company_name=current_user.employer.company_name) }}">Мой профиль</a></li>
                  <li><a class="dropdown-item" href="{{ url_for('auth.settings') }}">Настройки</a></li>
                  <li><hr class="dropdown-divider" /></li>
                  <li><a class="dropdown-item" href="{{ url_for('auth.logout') }}">Выйти</a></li>
                </ul>
              </li>
            </ul>
            {% endif %}
          </div>
        </div>
      </nav>
    </header>
    {% block content %}{% endblock %}
    <footer class="footer text-white mt-auto w-100" style="background-color: #007bff;">
        <div class="container">
            <div class="row py-3">
                <div class="col-md-6">
                    <h6>Разделы</h6>
                    <ul class="list-unstyled">
                        <li><a href="#" class="text-white text-decoration-none">Главная</a></li>
                        <li><a href="#" class="text-white text-decoration-none">Возможности</a></li>
                        <li><a href="#" class="text-white text-decoration-none">Цены</a></li>
                        <li><a href="#" class="text-white text-decoration-none">FAQ</a></li>
                        <li><a href="#" class="text-white text-decoration-none">О нас</a></li>
                    </ul>
                </div>
                <div class="col-md-6">
                    <h6>Подписка на новости</h6>
                    <form>
                        <div class="input-group mb-3">
                            <input type="email" class="form-control" placeholder="Ваш email">
                            <button class="btn btn-outline-light" type="submit">Подписаться</button>
                        </div>
                    </form>
                </div>
            </div>
            <div class="row border-top pt-3">
                <div class="col-md-6">
                    <p>© 2024 Company, Inc. Все права защищены.</p>
                </div>
                <div class="col-md-6 text-end">
                    <a href="https://t.me/belkaratarosk" class="text-white me-3" target="_blank"><i class="bi bi-telegram fs-4"></i></a>
                    <a href="https://github.com/pradigmaz/studporfolio" class="text-white" target="_blank"><i class="bi bi-github fs-4"></i></a>
                </div>
            </div>
        </div>
    </footer>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
    <script src="{{ url_for('static', filename='js/popover.js') }}"></script>
  </body>
</html>
